<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>个人博客网站</title>
    </head>
    <body>
        <h1>个人博客</h1>
        <a href="/user/add/">新建</a>
        <table>
            <thead>
                <tr>
                    <th>用户名</th>
                    <th>性别</th>
                    <th>地址</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                {{range .users}}
                   <tr>
                        <td>{{.Name}}</td>
                        <td>{{if .Sex}}男{{else}}女{{end}}</td>
                        <td>{{.Addr}}</td>
                        <td>
                            <a href="/user/edit/?id={{.ID}}">编辑</a>
                            <a href="/user/delete/?id={{.ID}}">删除</a>
                        </td>
                   </tr>
                {{end}}
            </tbody>
        </table>
    </body>
</html>